<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    var left = "刀";
    var right = "叉";
    var temp ="";
    document.write("left = " + left + "<br>");
    document.write("right = " + right + "<br>");
     document.write("------------------<br>");
//开始交换
    temp = left;
    left = right;
    right = temp;

    document.write("left = " + left + "<br>");
    document.write("right = " + right + "<br>");


</script>
</html>